package com.it.oop;

//构造方法的测试类
public class ConsDemo {
    public static void main(String[] args) {
        //调用无参构造
        Student student1 = new Student();
        student1.name = "zg";
        student1.age = 18;
        student1.className = "java2024";
        student1.student_ID = 5;
        student1.sayHi();

        //调用全参构造方法
        Student student2 = new Student("zz", 19, "java2024", 9);
        student2.sayHi();
    }
}
